package com.study.nacos.nacosstudy;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;

@SpringBootApplication
public class NacosStudyApplication {

    public static void main(String[] args) throws InterruptedException {
        ConfigurableApplicationContext context = SpringApplication.run(NacosStudyApplication.class, args);
//        // 从Environment获取配置
//        while (true) {
//            String test = context.getEnvironment().getProperty("test");
//            System.out.println(test);
//            TimeUnit.SECONDS.sleep(5);
//        }

    }



}
